Skip to content

Let block terminators claim the preceding newline for consistency#9925

Draft
pmario wants to merge 1 commit into
TiddlyWiki:masterfrom
pmario:fix/block-terminator-newline
Draft

Let block terminators claim the preceding newline for consistency#9925
pmario wants to merge 1 commit into
TiddlyWiki:masterfrom
pmario:fix/block-terminator-newline

Conversation

@pmario

@pmario pmario commented Jul 12, 2026

Copy link
Copy Markdown
Member

Consistency fix: every block terminator now claims the newline before its closing marker, so paragraph text is identical with and without a blank line, and quoteblock, styleblock, html and conditional behave like codeblock, typedblock and macrodef.

  • Anchor the quoteblock and styleblock terminators from the newline
  • Prefix the html and conditional terminators with an optional newline; a mandatory anchor would break legal mid-line close tags
  • Leave inline paths unchanged: a newline in an inline run is real content
  • Correct the (:?^| typo to (?:^| in the fnprocdef end marker regexp

Compatibility: these paragraph text nodes no longer end with an invisible newline and their end positions shift. Rendered output is unchanged; practical risk is low.

Part of #9908.

Consistency fix: every block terminator now claims the newline before
its closing marker, so paragraph text is identical with and without a
blank line, and quoteblock, styleblock, html and conditional behave
like codeblock, typedblock and macrodef. Fixes TiddlyWiki#9907.

* Anchor the quoteblock and styleblock terminators from the newline
* Prefix the html and conditional terminators with an optional newline;
  a mandatory anchor would break legal mid-line close tags
* Leave inline paths unchanged: a newline in an inline run is real
  content
* Correct the (:?^| typo to (?:^| in the fnprocdef end marker regexp

Compatibility: these paragraph text nodes no longer end with an
invisible newline and their end positions shift. Rendered output is
unchanged; practical risk is low.
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit dce5ba0
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/6a540ada315e6600084d5e2c
😎 Deploy Preview https://deploy-preview-9925--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

Confirmed: pmario has already signed the Contributor License Agreement (see contributing.md)

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2492.6 KB
PR 2493.3 KB

Diff: ⬆️ Increase: +0.8 KB


✅ Change Note Status

All change notes are properly formatted and validated!

📝 $:/changenotes/5.5.0/#9907

Type: bugfix | Category: developer
Release: 5.5.0

Paragraph text before a block closing marker no longer carries a trailing newline

🔗 #9907

👥 Contributors: pmario


⚠️ Impact: $:/changenotes/5.5.0/#9907/impacts/text-end-positions

Impact Type: compatibility-break
Related Change: $:/changenotes/5.5.0/#9907

Text and end positions of paragraph nodes before block terminators have changed


📖 Change Note Guidelines

Change notes help track and communicate changes effectively. See the full documentation for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block terminators swallow the newline before their closing marker

1 participant